using System;
using System.Text;

namespace iBeauty.BusinessObjects
{
	[Serializable()]
	public class Bill
	{
		private string _ID;

		public string ID
		{
			get { return _ID; }
			set { _ID = value; }
		}

		private DateTime? _CreateDate;

		public DateTime? CreateDate
		{
			get { return _CreateDate; }
			set { _CreateDate = value; }
		}

		private DateTime? _ModifiedDate;

		public DateTime? ModifiedDate
		{
			get { return _ModifiedDate; }
			set { _ModifiedDate = value; }
		}

		private DateTime? _TimeStamp;

		public DateTime? TimeStamp
		{
			get { return _TimeStamp; }
			set { _TimeStamp = value; }
		}

		private string _BillCode;

		public string BillCode
		{
			get { return _BillCode; }
			set { _BillCode = value; }
		}

		private DateTime? _BillDate;

		public DateTime? BillDate
		{
			get { return _BillDate; }
			set { _BillDate = value; }
		}

		private string _SupplierCode;

		public string SupplierCode
		{
			get { return _SupplierCode; }
			set { _SupplierCode = value; }
		}

		private string _SupplierName;

		public string SupplierName
		{
			get { return _SupplierName; }
			set { _SupplierName = value; }
		}

		private string _ShopCode;

		public string ShopCode
		{
			get { return _ShopCode; }
			set { _ShopCode = value; }
		}

		private string _ShopName;

		public string ShopName
		{
			get { return _ShopName; }
			set { _ShopName = value; }
		}

		private string _StaffCode;

		public string StaffCode
		{
			get { return _StaffCode; }
			set { _StaffCode = value; }
		}

		private string _StaffName;

		public string StaffName
		{
			get { return _StaffName; }
			set { _StaffName = value; }
		}

		private string _BillType;

		public string BillType
		{
			get { return _BillType; }
			set { _BillType = value; }
		}

		private string _PaymentType;

		public string PaymentType
		{
			get { return _PaymentType; }
			set { _PaymentType = value; }
		}

		private string _QuantityTotal;

		public string QuantityTotal
		{
			get { return _QuantityTotal; }
			set { _QuantityTotal = value; }
		}

		private Double? _TaxRate;

		public Double? TaxRate
		{
			get { return _TaxRate; }
			set { _TaxRate = value; }
		}

		private Double? _MoneyTotalNoTax;

		public Double? MoneyTotalNoTax
		{
			get { return _MoneyTotalNoTax; }
			set { _MoneyTotalNoTax = value; }
		}

		private Double? _TaxTotal;

		public Double? TaxTotal
		{
			get { return _TaxTotal; }
			set { _TaxTotal = value; }
		}

		private Double? _MoneyTotal;

		public Double? MoneyTotal
		{
			get { return _MoneyTotal; }
			set { _MoneyTotal = value; }
		}

		private Double? _PayTotal;

		public Double? PayTotal
		{
			get { return _PayTotal; }
			set { _PayTotal = value; }
		}

		private Double? _DebtTotal;

		public Double? DebtTotal
		{
			get { return _DebtTotal; }
			set { _DebtTotal = value; }
		}

		private int? _AccountId;

		public int? AccountId
		{
			get { return _AccountId; }
			set { _AccountId = value; }
		}

		private string _Note;

		public string Note
		{
			get { return _Note; }
			set { _Note = value; }
		}

		public Bill()
		{ }

		public Bill(string ID,DateTime? CreateDate,DateTime? ModifiedDate,DateTime? TimeStamp,string BillCode,DateTime? BillDate,string SupplierCode,string SupplierName,string ShopCode,string ShopName,string StaffCode,string StaffName,string BillType,string PaymentType,string QuantityTotal,Double? TaxRate,Double? MoneyTotalNoTax,Double? TaxTotal,Double? MoneyTotal,Double? PayTotal,Double? DebtTotal,int? AccountId,string Note)
		{
			this.ID = ID;
			this.CreateDate = CreateDate;
			this.ModifiedDate = ModifiedDate;
			this.TimeStamp = TimeStamp;
			this.BillCode = BillCode;
			this.BillDate = BillDate;
			this.SupplierCode = SupplierCode;
			this.SupplierName = SupplierName;
			this.ShopCode = ShopCode;
			this.ShopName = ShopName;
			this.StaffCode = StaffCode;
			this.StaffName = StaffName;
			this.BillType = BillType;
			this.PaymentType = PaymentType;
			this.QuantityTotal = QuantityTotal;
			this.TaxRate = TaxRate;
			this.MoneyTotalNoTax = MoneyTotalNoTax;
			this.TaxTotal = TaxTotal;
			this.MoneyTotal = MoneyTotal;
			this.PayTotal = PayTotal;
			this.DebtTotal = DebtTotal;
			this.AccountId = AccountId;
			this.Note = Note;
		}

		public override string ToString()
		{
			return "ID = " + ID + ",CreateDate = " + CreateDate.ToString() + ",ModifiedDate = " + ModifiedDate.ToString() + ",TimeStamp = " + TimeStamp.ToString() + ",BillCode = " + BillCode + ",BillDate = " + BillDate.ToString() + ",SupplierCode = " + SupplierCode + ",SupplierName = " + SupplierName + ",ShopCode = " + ShopCode + ",ShopName = " + ShopName + ",StaffCode = " + StaffCode + ",StaffName = " + StaffName + ",BillType = " + BillType + ",PaymentType = " + PaymentType + ",QuantityTotal = " + QuantityTotal + ",TaxRate = " + TaxRate.ToString() + ",MoneyTotalNoTax = " + MoneyTotalNoTax.ToString() + ",TaxTotal = " + TaxTotal.ToString() + ",MoneyTotal = " + MoneyTotal.ToString() + ",PayTotal = " + PayTotal.ToString() + ",DebtTotal = " + DebtTotal.ToString() + ",AccountId = " + AccountId.ToString() + ",Note = " + Note;
		}

		public class IDComparer : System.Collections.Generic.IComparer<Bill>
		{
			public SorterMode SorterMode;
			public IDComparer()
			{ }
			public IDComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Bill> Membres
			int System.Collections.Generic.IComparer<Bill>.Compare(Bill x, Bill y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.ID.CompareTo(x.ID);
				}
				else
				{
					return x.ID.CompareTo(y.ID);
				}
			}
			#endregion
		}
		public class BillCodeComparer : System.Collections.Generic.IComparer<Bill>
		{
			public SorterMode SorterMode;
			public BillCodeComparer()
			{ }
			public BillCodeComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Bill> Membres
			int System.Collections.Generic.IComparer<Bill>.Compare(Bill x, Bill y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.BillCode.CompareTo(x.BillCode);
				}
				else
				{
					return x.BillCode.CompareTo(y.BillCode);
				}
			}
			#endregion
		}
		public class SupplierCodeComparer : System.Collections.Generic.IComparer<Bill>
		{
			public SorterMode SorterMode;
			public SupplierCodeComparer()
			{ }
			public SupplierCodeComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Bill> Membres
			int System.Collections.Generic.IComparer<Bill>.Compare(Bill x, Bill y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.SupplierCode.CompareTo(x.SupplierCode);
				}
				else
				{
					return x.SupplierCode.CompareTo(y.SupplierCode);
				}
			}
			#endregion
		}
		public class SupplierNameComparer : System.Collections.Generic.IComparer<Bill>
		{
			public SorterMode SorterMode;
			public SupplierNameComparer()
			{ }
			public SupplierNameComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Bill> Membres
			int System.Collections.Generic.IComparer<Bill>.Compare(Bill x, Bill y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.SupplierName.CompareTo(x.SupplierName);
				}
				else
				{
					return x.SupplierName.CompareTo(y.SupplierName);
				}
			}
			#endregion
		}
		public class ShopCodeComparer : System.Collections.Generic.IComparer<Bill>
		{
			public SorterMode SorterMode;
			public ShopCodeComparer()
			{ }
			public ShopCodeComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Bill> Membres
			int System.Collections.Generic.IComparer<Bill>.Compare(Bill x, Bill y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.ShopCode.CompareTo(x.ShopCode);
				}
				else
				{
					return x.ShopCode.CompareTo(y.ShopCode);
				}
			}
			#endregion
		}
		public class ShopNameComparer : System.Collections.Generic.IComparer<Bill>
		{
			public SorterMode SorterMode;
			public ShopNameComparer()
			{ }
			public ShopNameComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Bill> Membres
			int System.Collections.Generic.IComparer<Bill>.Compare(Bill x, Bill y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.ShopName.CompareTo(x.ShopName);
				}
				else
				{
					return x.ShopName.CompareTo(y.ShopName);
				}
			}
			#endregion
		}
		public class StaffCodeComparer : System.Collections.Generic.IComparer<Bill>
		{
			public SorterMode SorterMode;
			public StaffCodeComparer()
			{ }
			public StaffCodeComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Bill> Membres
			int System.Collections.Generic.IComparer<Bill>.Compare(Bill x, Bill y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.StaffCode.CompareTo(x.StaffCode);
				}
				else
				{
					return x.StaffCode.CompareTo(y.StaffCode);
				}
			}
			#endregion
		}
		public class StaffNameComparer : System.Collections.Generic.IComparer<Bill>
		{
			public SorterMode SorterMode;
			public StaffNameComparer()
			{ }
			public StaffNameComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Bill> Membres
			int System.Collections.Generic.IComparer<Bill>.Compare(Bill x, Bill y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.StaffName.CompareTo(x.StaffName);
				}
				else
				{
					return x.StaffName.CompareTo(y.StaffName);
				}
			}
			#endregion
		}
		public class BillTypeComparer : System.Collections.Generic.IComparer<Bill>
		{
			public SorterMode SorterMode;
			public BillTypeComparer()
			{ }
			public BillTypeComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Bill> Membres
			int System.Collections.Generic.IComparer<Bill>.Compare(Bill x, Bill y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.BillType.CompareTo(x.BillType);
				}
				else
				{
					return x.BillType.CompareTo(y.BillType);
				}
			}
			#endregion
		}
		public class PaymentTypeComparer : System.Collections.Generic.IComparer<Bill>
		{
			public SorterMode SorterMode;
			public PaymentTypeComparer()
			{ }
			public PaymentTypeComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Bill> Membres
			int System.Collections.Generic.IComparer<Bill>.Compare(Bill x, Bill y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.PaymentType.CompareTo(x.PaymentType);
				}
				else
				{
					return x.PaymentType.CompareTo(y.PaymentType);
				}
			}
			#endregion
		}
		public class QuantityTotalComparer : System.Collections.Generic.IComparer<Bill>
		{
			public SorterMode SorterMode;
			public QuantityTotalComparer()
			{ }
			public QuantityTotalComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Bill> Membres
			int System.Collections.Generic.IComparer<Bill>.Compare(Bill x, Bill y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.QuantityTotal.CompareTo(x.QuantityTotal);
				}
				else
				{
					return x.QuantityTotal.CompareTo(y.QuantityTotal);
				}
			}
			#endregion
		}
		public class NoteComparer : System.Collections.Generic.IComparer<Bill>
		{
			public SorterMode SorterMode;
			public NoteComparer()
			{ }
			public NoteComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Bill> Membres
			int System.Collections.Generic.IComparer<Bill>.Compare(Bill x, Bill y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Note.CompareTo(x.Note);
				}
				else
				{
					return x.Note.CompareTo(y.Note);
				}
			}
			#endregion
		}
	}
}
